DISCUSSION
If the value of the semaphore is greater than zero, the value is decremented and the function returns with
noErr
. Otherwise, the task is blocked awaiting a signal until the specified timeout is exceeded.
If you call this function from a cooperative task, you should specify only
kDurationImmediate
for the timeout length; other waits will cause the task to block.